package com.hongye.broker.controller;

import com.hongye.broker.service.HouseTypeService;
import com.hongye.common.entity.HouseTypeEntity;
import com.hongye.common.response.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;

/*
* 房产类型
* */
@RestController
@RequestMapping("/houseType")
public class HouseTypeController {
    @Autowired
    private HouseTypeService houseTypeService;

    @RequestMapping("/list")
    public ResponseResult list(){
        List<HouseTypeEntity> list = houseTypeService.list();
        HashMap<String, Object> map = new HashMap<>();
        map.put("list",list);
        return ResponseResult.ok(1,"成功",map);
    }
}
